#include <iostream>
#include <vector>
using namespace std;
#define pss pair<string,string>

int n;
vector<pss> v;

signed main()
{
    cin>>n;
    for(int i=0;i<n;i++){
        string id,p;
        cin>>id>>p;
        int flag = 0;
        for(int j=0;j<p.size();j++){
            if(p[j]=='l'||p[j]=='O'||p[j]=='1'||p[j]=='0')    flag = 1;
            if(p[j]=='1')    p[j] = '@';
            if(p[j]=='0')    p[j] = '%';
            if(p[j]=='l')    p[j] = 'L';
            if(p[j]=='O')    p[j] = 'o';
        }
        if(flag)    v.push_back({id,p});
    }
    if(v.empty()){
        if(n==1)    printf("There is %d account and no account is modified\n",n);
        else    printf("There are %d accounts and no account is modified\n",n);
    }
    else{
        cout<<v.size()<<"\n";
        for(int i=0;i<v.size();i++)    cout<<v[i].first<<" "<<v[i].second<<"\n";
    }
    return 0;
}
